Skip to main content

Loading Data

Speediful provides data loading capabilties via SOAP, Bulk v1 and Bulk v2 APIs. A unified interface is provided by the procedure SLAM_load which requires an @api parameter. Alternatively, users can directly call the various SLAM_load_<api_name>. All operations are logged to SLAM_Activity_Log

General Requirements for Loading Data:

The input table should have an Id column defined as an NCHAR(18) or NVARCHAR(18) to receive the Salesforce Id returned by Salesforce.

Effect of Load Operations:

Every data load operation results in the following columns being added to the input table:

  • SLAM_Message - the end result of the operation: 'Operation Successful.' or an error message return by Salesforce
  • SLAM_unique_id (as needed) - a generated unique identifier if there is no available key column in the input table

As responses are received from Salesforce, the SLAM_* fields are populated and the Id column is written with the Salesforce Id from the response

important

When loading data to Salesforce, Speediful ignores rows with SLAM_Message = 'Operation Successful.' This approach makes it simple for users to correct data issues in-situ without risk of creating duplicate records, while also keeping Salesforce data processing volumes efficient

Fields that exist in the input table but do not exist in the Salesforce target will be ignored. A common problem is that Salesforce fields do not get populated as expected. This is usually caused by incomplete field level security configuration, where the user performing the data load does not have edit access to the fields that need to be populated

Bulk jobs that fail on the client side but complete on the Salesforce server can be retrieved using SLAM_download_job documented elsewhere

Dual Relationship Syntax Support

Speediful supports two relationship naming styles for upsert operations:

  • RelationshipName.Field (Salesforce standard style)
    • Examples: Owner.Username and Contact_Lookup__r.External_Id__c
  • FieldApiName.Field (DBAmp compatibility style)
    • Examples: OwnerId.Username and Contact_Lookup__c.External_Id__c

A brief overview of the APIs:

  • SOAP API is suited to smaller volumes of records and provides additional controls via header options (see SOAP Headers section). SOAP is the only API to support undelete

  • Bulk v1 API provides the highest level of control over large data loads, including batch sizes and serial vs parallel processing. Bulk v1 supports hardDelete. Note that Salesforce specifically (has not validated Bulk v1 for use with custom address fields)[https://help.salesforce.com/s/articleView?id=platform.fields_caf_requirements.htm&type=5] and therefore you should look to Bulk v2 in those situations

  • Bulk v2 API provides a simplified approach to large data loads, allowing Salesforce to take a determining role in the orchestration of the job. Bulk v2 supports hardDelete